var forever = require('forever-monitor');
var path = require('path');

var wallServerScript = path.join(__dirname, 'onwall-server.js');

var logfile = path.join(__dirname, 'logs/onwall-daemon-log.log');
var outfile = path.join(__dirname, 'logs/onwall-daemon-out.log');
var errfile = path.join(__dirname, 'logs/onwall-daemon-err.log');

var child = new (forever.Monitor)(wallServerScript, {
	'watch' : true,
	'watchIgnoreDotFiles' : null,
	'watchIgnorePatterns' : null,
	'watchDirectory' : __dirname,
	'logFile' : logfile,
	'outFile' : outfile,
	'errFile' : errfile
});

child.on('exit', function() {
	
});

child.start();